package com.codegeek.project.slope.service;

import com.codegeek.project.slope.domain.SlopeDevice;
import java.util.List;
import java.util.Map;

/**
 * 设备Service接口
 *
 * @author codegeek
 * @date 2020-02-17
 */
public interface ISlopeDeviceService
{
    /**
     * 查询设备
     *
     * @param deviceId 设备ID
     * @return 设备
     */
    public SlopeDevice selectSlopeDeviceById(Long deviceId);

    /**
     * 查询设备列表
     *
     * @param slopeDevice 设备
     * @return 设备集合
     */
    public List<SlopeDevice> selectSlopeDeviceList(SlopeDevice slopeDevice);

    /**
     * 查询其他设备列表
     *
     * @param slopeDevice 设备
     * @return 设备集合
     */
    public List<SlopeDevice> selectSlopeOtherDeviceList(SlopeDevice slopeDevice);

    /**
     * 新增设备
     *
     * @param slopeDevice 设备
     * @return 结果
     */
    public int insertSlopeDevice(SlopeDevice slopeDevice);

    /**
     * 修改设备
     *
     * @param slopeDevice 设备
     * @return 结果
     */
    public int updateSlopeDevice(SlopeDevice slopeDevice);

    /**
     * 批量删除设备
     *
     * @param deviceIds 需要删除的设备ID
     * @return 结果
     */
    public int deleteSlopeDeviceByIds(Long[] deviceIds);

    /**
     * 删除设备信息
     *
     * @param deviceId 设备ID
     * @return 结果
     */
    public int deleteSlopeDeviceById(Long deviceId);

    /**
     * 首页设备状态统计
     * @return
     */
    public List<Map<String,Object>> countSlopeDeviceByState();

    /**
     * 修改设备状态
     * @return
     */
    public int editDeviceState(Integer state,String devices);

    String importDevice(List<SlopeDevice> deviceList, boolean updateSupport, String operName, List<Map<String, Object>> imeiList);

    /**
     * @title getDeviceByImei
     * @description 通过IMEI号获取在线设备
     * @param imei 设备IMEI号
     * @return
     * @throws
     */
    public SlopeDevice getDeviceByImei(String imei);

    /**
     * 查询所有的imei
     * @return
     */
    List<Map<String, Object>> selectAllDeviceImei();
}
